//package com.xln.furns.web;
//
//import com.xln.furns.entity.Member;
//import com.xln.furns.service.LoginService;
//import com.xln.furns.service.impl.LoginServiceimpl;
//
//import javax.servlet.*;
//import javax.servlet.http.*;
//import java.io.IOException;
//
//public class LoginServlet extends HttpServlet {
//    @Override
//    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//        doPost(request,response);
//    }
//
//    @Override
//    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//        // System.out.printf("调用了Loginservler方法！");
//        String username = request.getParameter("username");
//        String password = request.getParameter("password");
//        LoginService loginService = new LoginServiceimpl();
//    if (loginService.login(new Member(null,username,password,null)) == null){
//        //把登录错误信息，放入到请求域=>如果忘了，可以看Servlet/jsp
//        request.setAttribute("msg","用户名或者密码错误！");
//        request.setAttribute("username",username);
//        request.getRequestDispatcher("/views/member/login.jsp").
//                forward(request,response);
//
//    }else {
//        request.getRequestDispatcher("/views/member/login_ok.jsp").
//                forward(request,response);
//
//    }
//
//
//    }
//}
